using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace OpenPanekitEditor.Forms
{
    public partial class ConsoleForm : Form
    {
        public ConsoleForm()
        {
            InitializeComponent();
            TextConsole.SetWriteLineMethod(new TextConsole.WriteLineMethod(textBox1.AppendText));
            TextConsole.SetClearLineMethod(new TextConsole.ClearTextMethod(textBox1.Clear));
            TextConsole.FlushText();
            this.FormClosed += new FormClosedEventHandler(ConsoleForm_FormClosed);
        }

        void ConsoleForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            TextConsole.SetWriteLineMethod(null);
            TextConsole.SetClearLineMethod(null);
        }
        private void flowLayoutPanel1_Paint(object sender, PaintEventArgs e)
        {

        }

        private void ClearText_click(object sender, EventArgs e)
        {
            TextConsole.Clear();
        }

        private void CloseForm_click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}